#include<bits/stdc++.h>
#define int long long
using namespace std;
int n,k,u,v;
signed main() {
	freopen("life.in","r",stdin);
	freopen("life.out","w",stdout);
	ios::sync_with_stdio(0);
	cin.tie(0),cout.tie(0);
	cin>>n>>k;
	for(int i=1;i<n;i++) cin>>u>>v;
	cout<<k;
	return 0;
}
